set nocompatible              " be iMproved, required
filetype off                  " required
set rtp+=~/.local/share/nvim/site/autoload/plug.vim
call plug#begin('~/.local/share/nvim/plugged')
Plug 'junegunn/vim-easy-align'
" Plug 'preservim/nerdtree'
Plug 'jiangmiao/auto-pairs'
Plug 'tell-k/vim-autopep8'
" Plug 'ryanoasis/vim-devicons'
Plug 'mhinz/vim-startify'
Plug 'yaegassy/coc-volar', {'do': 'yarn install --frozen-lockfile'}
Plug 'yaegassy/coc-volar-tools', {'do': 'yarn install --frozen-lockfile'}
Plug 'adriaanzon/vim-emmet-ultisnips'
Plug 'airblade/vim-gitgutter'
Plug 'honza/vim-snippets'
Plug 'junegunn/fzf'
" Plug 'neoclide/coc-git'
" Plug 'kdheepak/lazygit.vim'
Plug 'nlknguyen/papercolor-theme'
Plug 'neoclide/coc-tabnine'
Plug 'thinca/vim-quickrun'
Plug 'Shougo/deoplete.nvim'
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'dstein64/vim-menu'
Plug 'preservim/nerdcommenter'
" Plug 'joshdick/onedark.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/goyo.vim'
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
Plug 'voldikss/vim-floaterm'
" Plug 'yggdroot/leaderf'
Plug 'stevearc/dressing.nvim'
" Plug 'akinsho/bufferline.nvim'
" Plug 'nvim-lualine/lualine.nvim'
" Plug 'feline-nvim/feline.nvim'
" Plug 'lewis6991/gitsigns.nvim'
" Plug 'nvim-treesitter/nvim-treesitter'
" Plug 'nvim-neotest/neotest'
if !has('nvim')
  Plugin 'roxma/nvim-yarp'
  Plugin 'roxma/vim-hug-neovim-rpc'
endif

" Plug 'vim-airline/vim-airline'
" Plug 'vim-airline/vim-airline-themes'
" let g:airline#extensions#tabline#enabled = 1   " 是否打开tabline
"这个是安装字体后 必须设置此项" 
" let g:airline_powerline_fonts = 1
" set laststatus=2  "永远显示状态栏
" let g:airline_theme='onedark' "选择主题

Plug 'Yggdroot/indentLine'
let g:indentLine_enabled = 1			" 使插件生效
let g:indentLine_char = '¦'				" 设置缩进线字符，也可以为 '|', '┆', '┊' 等
let g:indentLine_conceallevel = 2 		" 使插件正常运行
" let g:indent_guides_guide_size            = 1  " 指定对齐线的尺寸
" let g:indent_guides_start_level           = 2  " 从第二层开始可视化显示缩进

Plug 'SirVer/ultisnips'
let g:UltiSnipsEditSplit           = "horizontal"  " how the edit window is opened
let g:indentLine_setColors = 1
set laststatus=2
let g:UltiSnipsExpandTrigger = "<ctrl-c>"
let g:UltiSnipsListSnippets = "<alt-tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<ctrl-tab>"
let g:UltiSnipsSnippetDirectories=["UltiSnips","UltiSnips"]
" If you want :UltiSnipsEdit to split your window.
let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsSnippetDirectories=[$HOME.'/.vim/bundle/vim-snippets/UltiSnips']

Plug 'w0rp/ale'
let g:ale_sign_column_always = 1
let g:ale_sign_error = '#'
let g:ale_sign_warning = '?'
let g:ale_statusline_format = ['⨉ %d', '⚠ %d', '⬥ ok']
let g:ale_echo_msg_error_str = 'E'
let g:ale_echo_msg_warning_str = 'W'
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'

Plug 'yggdroot/indentline'
let g:indentLine_color_term = 239
let g:indentLine_setColors = 1

Plug 'neoclide/coc-snippets'
let g:coc_snippet_next = '<c-j>'
let g:coc_snippet_prev = '<c-k>'

" Plug 'ctrlpvim/ctrlp.vim'
" let g:ctrlp_map = '<c-p>'
" let g:ctrlp_cmd = 'CtrlP'

" Plug 'cj/vim-webdevicons'
" let g:webdevicons_enable = 1
" let g:webdevicons_enable_airline_tabline = 1
" let g:webdevicons_enable_airline_statusline = 1
" let WebDevIconsUnicodeDecorateFolderNodesExactMatches = 1
" let g:WebDevIconsUnicodeDecorateFileNodes = 1

" Plug 'APZelos/blamer.nvim'
" let g:blamer_enabled = 1
" let g:blamer_show_in_insert_modes = 0
" let g:blamer_template = '<committer> <committer-time> • <summary>'
" let g:blamer_date_format = '%d/%m/%y'
" let g:blamer_relative_time = 1
" let g:blamer_prefix = '  '
" highlight Blamer guifg=lightgrey

" Plug 'sainnhe/vim-color-forest-night'
" let g:everforest_better_performance = 1
" let g:everforest_background = 'hard'

call plug#end()            " required
filetype plugin indent on    " required

"帮助文档
" 简要帮助文档
   " :PlugList       - 列出所有已配置的插件
   " :PlugInstall    - 安装插件,追加 `!` 用以更新或使用 :PluginUpdate
   " :PlugSearch foo - 搜索 foo ; 追加 `!` 清除本地缓存
   " :PlugClean      - 清除未使用插件,需要确认; 追加 `!` 自动批准移除未使用插件
   " :PlugStatus     - null
   " :PlugDiff       - null
   " :PlugSnapshot[!]- 生成用于恢复插件当前快照的脚本
   " [output path]

"others
let g:NERDSpaceDelims = 1
augroup YourGroup
    autocmd!
    autocmd User ALELint call YourFunction()
augroup END
" let g:CommandTPreferredImplementation='ruby'
let g:coc_snippet_next = '<c-j>'
let g:coc_snippet_prev = '<c-k>'
